<?php
include 'init.php';
include "./include/membersite_config.php";

if(!$fgmembersite->CheckLogin())
{
    $fgmembersite->RedirectToURL("index.php");
    exit;
}

if (image_check($_GET['image_id']) === false) {
  header('Location: albums.php');
  exit();
}

if (isset($_GET['image_id'])) {
  delete_image($_GET['image_id']);
  header('Location: '.$_SERVER['HTTP_REFERER']);
  exit();
}
?>
